package com.niit.agricstore.mapper;
import java.math.BigDecimal;
import java.util.Date;
import java.util.List;
import org.apache.ibatis.annotations.Param;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.niit.agricstore.entity.Item;
import org.apache.ibatis.annotations.Mapper;

@Mapper
public interface ItemMapper extends BaseMapper<Item> {
//库存相关接口
    List<Item> selectByItemId(@Param("itemId") int itemId);

    List<Item> findAllByItemCategory(@Param("itemCategory") String itemCategory);

    List<Item> findItemStockAndItemShelfLifeByItemId(@Param("itemId") int itemId);

    List<Item> findItemUnitPriceByItemId(@Param("itemId") int itemId);

    int insertAll(Item item);

    int delByItemId(@Param("itemId") int itemId);

    int updateItemStockAndItemProductionDateByItemId(@Param("itemStock") int itemStock, @Param("itemProductionDate") Date itemProductionDate, @Param("itemId") int itemId);

    int updateItemUnitPriceByItemId(@Param("itemUnitPrice") BigDecimal itemUnitPrice, @Param("itemId") int itemId);


}
